package org.geeks.gscaffeine.func;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

@Slf4j
public class CaffeineStatisticsT {

  @Test
  public void stastics() {
    Cache<String, String> cache = Caffeine.newBuilder().maximumSize(10_000).recordStats().build();

    cache.put("Geek-S", "Hello, world");

    cache.getIfPresent("Geek-S");

    log.info("Stastics is {}", cache.stats());
  }
}
